package schoolWork.work04.test3;

public class Test1 {
    public static void main(String[] args) {
        int[] arr = new int[]{1,2,3};
        try{
            for (int i = 0; i < 4; i++) {
                System.out.print(arr[i]+" ");
            }
            System.out.println("我没有机会输出了");
        }catch(Exception e){
            System.out.println();
            System.out.println("数组越界异常");
            System.exit(1);
        }
    }
}
